package com.kpf.springcloud.controller;

import com.kpf.springcloud.common.ResultJson;
import com.kpf.springcloud.service.IKpfTopicLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shiwen
 * @date 2021/3/7
 */
@RestController
public class KpfTopicLikeController {

    @Autowired
    private IKpfTopicLikeService likeService;

    @PostMapping("/like/likeTopic")
    public ResultJson likeTopic(int topicId, int status) {
        likeService.likeTopic(topicId, status);
        return ResultJson.ok();
    }

}